namespace Brjnk.Common
{
    using System;
    using System.Windows.Data;

    /// <summary>
    /// </summary>
    public class ElevationConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value is Distance)
            {
                return ((Distance)value).ToString(UnitsSettings.Instance.Elevation);
            }
            else return null;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}